////////////////////
// Accessibility Features
////////////////////

import { types } from "./types";

/**
 * Use the `Browser.accessibilityFeatures` API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request `accessibilityFeatures.read` permission. For modifying feature state, the extension needs `accessibilityFeatures.modify` permission. Note that `accessibilityFeatures.modify` does not imply `accessibilityFeatures.read` permission.
 *
 * Permissions: "accessibilityFeatures.read", "accessibilityFeatures.modify"
 */
export namespace accessibilityFeatures {
    /** `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission. */
    export const animationPolicy: types.ChromeSetting<"allowed" | "once" | "none"> = new types.ChromeSettingImpl<"allowed" | "once" | "none">()

    /**
     * Auto mouse click after mouse stops moving. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const autoclick: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Caret highlighting. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    export const caretHighlight: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Cursor color. The value indicates whether the feature is enabled or not, doesn't indicate the color of it.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 85
     */
    export const cursorColor: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Cursor highlighting. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    export const cursorHighlight: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Dictation. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 90
     */
    export const dictation: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Docked magnifier. The value indicates whether docked magnifier feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 87
     */
    export const dockedMagnifier: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Focus highlighting. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    export const focusHighlight: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * High contrast rendering mode. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const highContrast: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Enlarged cursor. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const largeCursor: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Full screen magnification. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const screenMagnifier: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Select-to-speak. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    export const selectToSpeak: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Spoken feedback (text-to-speech). The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const spokenFeedback: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Sticky modifier keys (like shift or alt). The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const stickyKeys: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Switch Access. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     * @since Chrome 51
     */
    export const switchAccess: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()

    /**
     * Virtual on-screen keyboard. The value indicates whether the feature is enabled or not.
     * `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
     * @platform ChromeOS only
     */
    export const virtualKeyboard: types.ChromeSetting<boolean> = new types.ChromeSettingImpl<boolean>()
}